package com.example.chapter03.demo3;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

// @Override
// public void doGet(HttpServletRequest req, HttpServletResponse resp)
// throws IOException {
//        System.out.println("hello FirstServlet");
//        resp.getWriter().write("hello FirstServlet");
//        }
    @WebServlet("/first")
  public class FirstServlet extends HttpServlet {
  @Override
  public void doGet(HttpServletRequest req, HttpServletResponse resp)
  throws IOException {
             System.out.println("hello FirstServlet");
             resp.getWriter().write("hello FirstServlet");
             }
}